package com.ybf.api.entity;
import jakarta.validation.constraints.NotBlank;
import jakarta.websocket.Session;
import lombok.Data;

@Data
// websocket 用户
public class WsUser {
    private Integer userId;
    private Session session;
    private String groupId;
    private long linkTimeout;
    // 超时时间
    private Integer delayTime = 30 * 1000;

    public void updateLinkTimeout() {
        this.linkTimeout = System.currentTimeMillis() + delayTime;
    }
}
